import qs from 'qs'
import request from '@/utils/request'
// 签名
import _bale from '@/utils/package'

// 获取运费模板详情
export function addFreight(params) {
  return request({
    url: '/freight/addSupplierFreight',
    method: 'post',
    data: qs.stringify(_bale('addSupplierFreight', params))
  })
}
// 获取运费模板列表
export function getFreightList(params) {
  return request({
    url: '/freight/getSupplierFreightList',
    method: 'post',
    data: qs.stringify(_bale('getSupplierFreightList', params))
  })
}

// 删除运费模板
export function delFreight(params) {
  return request({
    url: '/freight/deleteSupplierFreight',
    method: 'post',
    data: qs.stringify(_bale('deleteSupplierFreight', params))
  })
}
// 编辑运费模板
export function editFreight(params) {
  return request({
    url: '/freight/editSupplierFreight',
    method: 'post',
    data: qs.stringify(_bale('editSupplierFreight', params))
  })
}
// 获取运费模板详情
export function getFreightDetail(params) {
  return request({
    url: '/freight/getSupplierFreightDetails',
    method: 'post',
    data: qs.stringify(_bale('getSupplierFreightDetails', params))
  })
}
// 设置默认模板
export function setFreightDefault(params) {
  return request({
    url: '/freight/setDefaultSupplierFreight',
    method: 'post',
    data: qs.stringify(_bale('setDefaultSupplierFreight', params))
  })
}
